]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Recalculate window positions when we have no layout
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 22 Apr 2013 22:14:02 +0000 (18:14 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 22 Apr 2013 22:33:34 +0000 (18:33 -0400)
If for any reason the current layout is invalidated, queue a
reposition.

https://bugzilla.gnome.org/show_bug.cgi?id=698622

js/ui/workspace.js

index a8d16ab19c47dd19fd7f3ff2462763f485166753..8121c69cb859036b97d3402f80d17f742484ee03 100644 (file)
@@ -989,8 +989,7 @@ const Workspace = new Lang.Class({
         Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
             this._dropRect.set_position(geom.x, geom.y);
             this._dropRect.set_size(geom.width, geom.height);
-            if (this._currentLayout != null)
-                this._updateWindowPositions(WindowPositionFlags.NONE);
+            this._updateWindowPositions(WindowPositionFlags.NONE);
             return false;
         }));
     },
@@ -1059,6 +1058,11 @@ const Workspace = new Lang.Class({
     },
 
     _updateWindowPositions: function(flags) {
+        if (this._currentLayout == null) {
+            this._recalculateWindowPositions(flags);
+            return;
+        }
+
         let initialPositioning = flags & WindowPositionFlags.INITIAL;
         let animate = flags & WindowPositionFlags.ANIMATE;